﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using System.Xml.Linq;

namespace Ocean.His.MedicalInsurance
{
    /// <summary>
    /// 
    /// </summary>
    [DataContract]
    public class SI2201Data
    {

        /// <summary>
        /// 人员编号
        /// 参数类型字符型
        /// 参数长度30
        /// 代码标识
        /// 是否必填Y
        /// 
        /// </summary>
        [DataMember(Name = "psn_no")]
        public string PsnNo { get; set; }

        /// <summary>
        /// 险种类型
        /// 参数类型字符型
        /// 参数长度6
        /// 代码标识Y
        /// 是否必填Y
        /// 
        /// </summary>
        [DataMember(Name = "insutype")]
        public string Insutype { get; set; }

        /// <summary>
        /// 开始时间
        /// 参数类型日期时间型
        /// 参数长度
        /// 代码标识
        /// 是否必填Y
        /// 挂号时间yyyy-MM-dd
        /// </summary>
        [DataMember(Name = "begntime")]
        public string Begntime { get; set; }

        /// <summary>
        /// 就诊凭证类型
        /// 参数类型字符型
        /// 参数长度3
        /// 代码标识Y
        /// 是否必填Y
        /// 
        /// </summary>
        [DataMember(Name = "mdtrt_cert_type")]
        public string MdtrtCertType { get; set; }

        /// <summary>
        /// 就诊凭证编号
        /// 参数类型字符型
        /// 参数长度50
        /// 代码标识
        /// 是否必填Y
        /// 就诊凭证类型为“01”时填写电子凭证令牌，为“02”时填写身份证号，为“03”时填写社会保障卡卡号
        /// </summary>
        [DataMember(Name = "mdtrt_cert_no")]
        public string MdtrtCertNo { get; set; }

        /// <summary>
        /// 住院/门诊号
        /// 参数类型字符型
        /// 参数长度30
        /// 代码标识
        /// 是否必填Y
        /// 院内唯一流水
        /// </summary>
        [DataMember(Name = "ipt_otp_no")]
        public string IptOtpNo { get; set; }

        /// <summary>
        /// 医师编码
        /// 参数类型字符型
        /// 参数长度30
        /// 代码标识
        /// 是否必填Y
        /// 
        /// </summary>
        [DataMember(Name = "atddr_no")]
        public string AtddrNo { get; set; }

        /// <summary>
        /// 医师姓名
        /// 参数类型字符型
        /// 参数长度50
        /// 代码标识
        /// 是否必填Y
        /// 
        /// </summary>
        [DataMember(Name = "dr_name")]
        public string DrName { get; set; }

        /// <summary>
        /// 科室编码
        /// 参数类型字符型
        /// 参数长度30
        /// 代码标识
        /// 是否必填Y
        /// 
        /// </summary>
        [DataMember(Name = "dept_code")]
        public string DeptCode { get; set; }

        /// <summary>
        /// 科室名称
        /// 参数类型字符型
        /// 参数长度100
        /// 代码标识
        /// 是否必填Y
        /// 
        /// </summary>
        [DataMember(Name = "dept_name")]
        public string DeptName { get; set; }

        /// <summary>
        /// 科别
        /// 参数类型字符型
        /// 参数长度10
        /// 代码标识Y
        /// 是否必填Y
        /// 
        /// </summary>
        [DataMember(Name = "caty")]
        public string Caty { get; set; }

        /// <summary>
        /// 字段扩展
        /// 参数类型字符型
        /// 参数长度4000
        /// 代码标识
        /// 是否必填
        /// 
        /// </summary>
        [DataMember(Name = "exp_content")]
        public string ExpContent { get; set; }


    }

    /// <summary>
    /// 
    /// </summary>
    [DataContract]
    public class SI2201InputModel
    {
        [DataMember(Name = "data")]
        public SI2201Data SI2201Data { get; set; }
    }

    /// <summary>
    /// 2201
    /// 门诊挂号
    /// </summary>
    [DataContract]
    public class SI2201RequestModel : SIBaseRequestModel
    {
        /// <summary>
        /// 交易输入
        /// </summary>
        [DataMember(Name = "input")]
        public SI2201InputModel Input { get; set; }

        public SI2201RequestModel(MedicalInsuranceOption medicalInsuranceOption,
            SI2201Data sI1101Data) : base(medicalInsuranceOption)
        {
            Infno = "2201";
            Input = new SI2201InputModel();
            Input.SI2201Data = sI1101Data;
        }
    }
}
